package com.myblog.Mapper;

import com.myblog.po.Blog;
import com.myblog.po.User;
import com.myblog.vo.BlogQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
@Mapper
public interface BlogMapper {
    List<Blog> listblog();
    Long CountBlog();

    void saveBlog(Blog blog);
    void DeleteBlog(Long id);
    void DeleteBlogFK(Long id);
    void EditBlog(Blog blog);

    void AddViews(Long id);

    Blog getBlog(Long id);

    List<Blog> searchblog(BlogQuery blog);
    List<Blog> listRecommendBlogTop();
    List<Blog> seekBlog(String query);
    List<Blog> listBlogbyTypeid(BlogQuery blogQuery);
    List<String> findGroupYear();
    List<Blog> findByYear(String year);




}
